package com.simplegovern.authority;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * SysActiontype entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "sys_actiontype")
public class SysActiontype implements java.io.Serializable {

	// Fields

	private Long id;
	private String name;
	private String description;
	private Integer sort;
	private Set<SysAction> sysActions = new HashSet<SysAction>(0);

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "name", nullable = false)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "description", nullable = false, length = 1000)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "sort", nullable = false)
	public Integer getSort() {
		return this.sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "sysActiontype")
	public Set<SysAction> getSysActions() {
		return this.sysActions;
	}

	public void setSysActions(Set<SysAction> sysActions) {
		this.sysActions = sysActions;
	}

}